home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
ada
/
c01oop.zip
/
ADAWKBK
/
SOL1-1.ADA
next >
Wrap
Text File
|
1992-08-25
|
752b
|
30 lines
-- Problem 1.1
-- by Rick Conn
with Text_IO; -- context specification
procedure Count_Down is -- an Ada mainline is always a procedure
Number_of_Iterations : Integer := 1;
-- local variable definition
package Int_IO is new Text_IO.Integer_IO (Integer);
-- local package for Integer I/O
begin -- Count_Down
Text_IO.Put ("Enter number of iterations: ");
Int_IO.Get (Number_of_Iterations);
Text_IO.New_Line;
Text_IO.Put ("The loop will run for ");
Int_IO.Put (Number_of_Iterations);
Text_IO.Put_Line (" iterations");
for Index in 1 .. Number_of_Iterations loop
Text_IO.Put ("Iteration: ");
Int_IO.Put (Index, 4); -- 4 column field
Text_IO.New_Line;
end loop;
end Count_Down;